//
//  MonthTicketTableCell.m
//  didacar
//
//  Created by 度周末网络-王腾 on 15/12/22.
//  Copyright © 2015年 dzmmac. All rights reserved.
//

#import "MonthTicketTableCell.h"
#import "UILabel+Yyx.h"
@implementation MonthTicketTableCell

- (void)awakeFromNib {
    self.ticketBg.layer.cornerRadius = 3;
    self.ticketBg.layer.masksToBounds=YES;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

}



-(void)setModel:(MonthTicketModel *)ticketModel selectedIndex:(NSInteger )selectedIndex{
    
    if (selectedIndex == self.indexPath.row) {
        self.ticketBg.layer.borderColor = GLOBLE_ORANGE_COLOR.CGColor;
        self.ticketBg.layer.borderWidth = 0.45;
    }else{
        self.ticketBg.layer.borderColor = [UIColor whiteColor].CGColor;
        self.ticketBg.layer.borderWidth = 0.45;
    }
    
    // 月份
    self.monthLabel.text = [NSString stringWithFormat:@"%@月",@(ticketModel.Month).stringValue];
    
    // 余xx张
    self.ticketCount.text= [NSString stringWithFormat:@"余%@张",@(ticketModel.SurplusNum).stringValue];;

    self.priceLabel.text = [NSString stringWithFormat:@"%@元",ticketModel.SalePrice];
    
    self.originPriceLabel.text = [NSString stringWithFormat:@"原价%@元",ticketModel.TicketPrice];
    [self.originPriceLabel setDeleteLine];
    
}

@end
